var i;
Object.defineProperty(exports, "__esModule", {
  value: true
});
var Item_Setting_UIBindings = require("AA_Item_Setting_UIBindings");
var ResKeeper = require("AA_ResKeeper");
var AudioManager = require("AA_AudioManager");
var _decorator = cc._decorator;
var _ccclass = _decorator.ccclass;
var _property = _decorator.property;

var _def_Item_Setting = function (e) {
  function _creator() {
    var t = null !== e && e.apply(this, arguments) || this;
    t.auto_ui = null;
    return t;
  }
  __extends(_creator, e);
  _creator.prototype.onEnable = function () {
    this._refersh();
    this.auto_ui.addClickListener(this._clickListener, this);
  };
  _creator.prototype._clickListener = function (e) {
    switch (e) {
      case this.auto_ui.btn_music:
        AudioManager.AudioMgr.isMusic = AudioManager.AudioMgr.isEffect = !AudioManager.AudioMgr.isMusic;
        break;
      case this.auto_ui.btn_shake:
        this.auto_ui.node_off_shake.active = !this.auto_ui.node_off_shake.active;
    }
    this._refersh();
  };
  _creator.prototype._refersh = function () {
    this.auto_ui.node_off_music.active = !AudioManager.AudioMgr.isMusic;
  };
  __decorate([_property(Item_Setting_UIBindings.default)], _creator.prototype, "auto_ui", undefined);
  return __decorate([_ccclass], _creator);
}(ResKeeper.default);
exports.default = _def_Item_Setting;